#ifndef USERS_H
#define USERS_H

#include "postgresql/libpq-fe.h";
#include "table.h";
#include "iostream";
#include "time.h";

#include <sys/time.h>
#include <stdio.h>
#include <unistd.h>

#include "extraclass.h";

using namespace std;

//enum error{ DB_OK = 1000, DB_NO_CONN, DB_NO_RESULT, DB_NO_INSERT, DB_NO_RECORD }; // странно как-то
//enum status{ S_ONLINE = 10, S_OFFLINE };

class Users : public Table
{
	public:
		Users ( ) : Table ( ) { }

		int Create( );
		int Clean( );

		int FindRecord( char * login, char * pass, int & id );

		int FindRecord( char * login, int & id );

		int InsRecord( char * login, char * pass );
};

#endif // USERS_H
